package com.ruoyi.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.labdata.service.EndTaskListener;
import com.ruoyi.system.domain.ProjectCreation;
import com.ruoyi.system.service.IProjectCreationService;

/**
 * 项目创建申请Service业务层处理
 *
 * @author ruoyi
 * @date 2022-02-13
 */
@Service
public class ProjectCreationEndTaskListener extends EndTaskListener<ProjectCreation> {

    @Autowired
    private IProjectCreationService projectCreationService;

    @Override
    public int doTask(Long instanceId) {
        ProjectCreation projectCreation = projectCreationService.selectProjectCreationById(instanceId);
        projectCreation.setStatus("1");
        return projectCreationService.updateProjectCreationStatus(projectCreation);
    }

}